var Item = React.createClass({
    itemClick:function(item){
        this.props.onClick(item);
    },
    render:function(){
        var addr = this.props.address;
        return (
            <div className={"m-addr_item"+" " +this.props.current} onClick={this.itemClick.bind(null, addr)}>
                <div className="item-left">
                    <img className="address-img item-cover" src={addr.picture&&addr.picture[0]} />
                </div>
                <div className="item-right">
                    <h3 className="item-name">{addr.name}</h3>
                    <p className="item-desc">{addr.description}</p>
                </div>
                <div className="item-bottom">
                    <span className="item-address">{addr.address}</span>
                    <span className="item-type">{addr.type}</span>
                    <span>IDis：{addr.id}</span>
                    <a href={"#/place/"+addr.id+"/edit"}>编辑</a>
                    
                </div>
            </div>
        )
    }
});
module.exports = Item;